<div class="form">
    <div class="form-group row">
        <div class="col-sm-6">
            <div class="input-group">
                <span class="input-group-addon" id="sizing-addon2"><i class="fa fa-search"></i> 全局搜索</span>
                <input type="text" class="form-control" placeholder="search" aria-describedby="sizing-addon2" [(ngModel)]="searchText">
            </div>
        </div>
    </div>
</div>
<table class="table table-bordered table-hover">
    <thead>
        <th>ID</th>
        <th>承运商名称</th>
        <th>地址</th>
        <th>联系人</th>
        <th>联系电话</th>
        <th>是否有效</th>
    </thead>
    <tbody>
        <tr *ngFor="let carrier of carriers" [class.selected]="carrier === selectedCarrier" (click)="onSelect(carrier)">
            <td>
                <span class="badge">{{carrier.carrier_id}}</span></td>
            <td>{{carrier.carrier_name}} </td>
            <td>{{carrier.address}}</td>
            <td>{{carrier.contact_name}}</td>
            <td>{{carrier.contact_mobile}}</td>
            <td>{{carrier.status}}</td>
        </tr>
    </tbody>
</table>

<carrier-detail [carrier]="selectedCarrier"></carrier-detail>
